package com.dd.config;

import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

/**
 * ProjectName: springMvc01->WebConfig
 * Description: TODO：
 * Author: 丘丘
 * DateTime: 2024/12/26 08:41
 */
public class WebConfig extends AbstractAnnotationConfigDispatcherServletInitializer {
    @Override
    protected Class<?>[] getRootConfigClasses() {
        return new Class[]{SpringConfig.class};    // 加载spring配置
    }

    @Override
    protected Class<?>[] getServletConfigClasses() {
        return new Class[]{SpringMvcConfig.class};  // 加载springMVC配置类
    }

    @Override
    protected String[] getServletMappings() {
        return new String[]{"/"};  // 设置网站要接管的目录
    }
}
